<template>
  <div>
      <h1 class="h1">我是登录页面</h1>
      <button @click="handleLogin">一键登录</button>
  </div>
</template>

<script>
export default {
    name: "Login",
    methods: {
        handleLogin() {
            localStorage.setItem("loginUser","Hydra");
            this.$store.commit("setUser",{user_name: "Hydra",token: "1234567"});
            // 进入首页
            this.$router.push("/welcome");
        }
    }
}
</script>

<style scoped>
    .h1 {
        color: #fc2277;
    }

</style>
